package com.ellwood.IPGuard.business.system.repository.impl;

import com.ellwood.IPGuard.business.system.repository.UmsSysUserRepositoryAdapter;
import com.ellwood.IPGuard.business.system.service.UmsSysUserService;
import com.ellwood.IPGuard.common.core.result.EllPageResult;
import com.ellwood.IPGuard.common.core.utils.EllExcelUtils;
import com.ellwood.IPGuard.infrastruction.domain.query.UmsSysUserQuery;
import com.ellwood.IPGuard.infrastruction.domain.vo.system.user.UmsSysUserVO;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @ProjectName: IPGuard-boot
 * @PackageName: com.ellwood.IPGuard.business.system.repository.impl
 * @ClassName: UmsSysUserRepositoryAdapterImpl
 * @Description: // 系统用户管理服务仓库适配器接口实现
 * @Author: Ellwood
 * @CreateDate: 2024/9/26 - 上午11:20
 * @Version: V1.0.0
 */
@AllArgsConstructor
@Component
public class UmsSysUserRepositoryAdapterImpl implements UmsSysUserRepositoryAdapter {
        
        private final UmsSysUserService userService;
        
        @Override
        public EllPageResult<UmsSysUserVO> userPage(UmsSysUserQuery userQuery) {
                return userService.userPage(userQuery);
        }
        
        @Override
        public List<UmsSysUserVO> findAll(UmsSysUserQuery userQuery) {
                return userService.findAll(userQuery);
        }
        
        @Override
        public UmsSysUserVO getUserById(Long id) {
                return userService.getUserById(id);
        }
        
        
        @Override
        public int saveUser(UmsSysUserVO userVO) {
                return userService.saveUser(userVO);
        }
        
        @Override
        public int userUpdate(UmsSysUserVO userVO) {
                return userService.userUpdate(userVO);
        }
        
        @Override
        public int userRemove(List<Long> idList) {
                return userService.userRemove(idList);
        }
        
        @Override
        public int userLogicRemove(Long userId) {
                return userService.userLogicRemove(userId);
        }
        
        @Override
        public void userImportExcel(MultipartFile file, String password) {
                userService.userImportExcel(file, password);
        }
        
        @Override
        public void userExport() {
                userService.userExport();
        }
        
}
